using System;
using System.Collections.Generic;
using System.ByteBuffer;
using tools;

namespace Dialog
{
    /// <summary>
    /// generate by msg tool
    /// 通用右下角展示消息
    /// </summary>
	public class ResShowMsg : ResMessage
	{
		//消息id
		public int msgId;
		//消息参数
		public List<String> args = new List<String>();
		

        public ResShowMsg() { }

        public ResShowMsg(int msgId)
        {
            this.msgId = msgId;
        }

        
		public void write(object obj)
		{
            ByteBuffer b = obj as ByteBuffer;
			b.PushInt(msgId);
			b.PushInt(args.Count);

			foreach (var element in args)
			{
				b.PushString(element);
				
			}
			
		}

	    public void read(object obj)
		{
            MyConverter b = obj as MyConverter;
			msgId = b.toInt32();
			int args_length = b.toInt32();
			for (int i = 0; i < args_length; ++i)
			{
				args.Add(b.toString());
				
			}
			
		}

		public int Id
		{
            get { return 400204; }
		}

        public String Desc
        {
            get { return "通用右下角展示消息"; }
        }
	}
}